<?php

declare(strict_types=1);

namespace App\Listeners\Sms;

use App\Events\Sms\VerifyCodeEvent;
use App\Jobs\Sms\VerifyCodeJob;
use Illuminate\Support\Facades\Log;

class VerifyCodeListener
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
    }

    public function handle(VerifyCodeEvent $event)
    {
        Log::info('VerifyCodeListener 触发短信发送');
        VerifyCodeJob::dispatch($event->getPhone(), $event->getCode());
    }
}
